home *** CD-ROM | disk | FTP | other *** search
- global LgST,annST,firstopen,gTTKPresent,gTToolsInstalled,gTTKName,mST,mS,gCurLang
- if ssn()=gTTKName then put getstr("CurrentLanguage") into gCurLang
- LS
- put tStr("LibMsg",40) into bn
- put "false" into newbookmenu
- set cursor to "busy"
- put "" into hadBooks
- put "" into hadBooksMsg
- put "" into hadBooksCheck
- put "" into hadBooksState
- put "" into hadBooksChar
- if there is a menu bn then
- put menu bn into hadBooks
- repeat with x = 1 to the number of lines in hadBooks
- set cursor to "busy"
- put the menumsg of menuitem x of menu bn into line x of hadBooksMsg
- put the checkmark of menuitem x of menu bn into line x of hadBooksCheck
- set cursor to "busy"
- put the enabled of menuitem x of menu bn into line x of hadBooksState
- put the commandchar of menuitem x of menu bn into line x of hadBooksChar
- end repeat
- else
- put get1str("SavedBookMenuState") into temp
- put "true" into newbookmenu
- if temp¡"" then
- put the itemdelimiter into id
- set the itemdelimiter to "■"
- put item 1 of temp into hadBooks
- put item 2 of temp into hadBooksMsg
- put item 3 of temp into hadBooksCheck
- put item 4 of temp into hadBooksState
- put item 5 of temp into hadBooksChar
- set the itemdelimiter to id
- end if
- end if
- reset menubar
- if gTTKPresent = "true" and gTToolsInstalled = "" then
- put "true" into gTToolsInstalled
- end if
- put "" into om
- if gTToolsInstalled ¡ "true" then
- --put "go,font,style,tools,objects" into om
- put HCMI(1)&"," after om
- -- if the optionkey = "up" then
- -- put HCMI(2)&"," after om
- -- put HCMI(3)&"," after om
- -- end if
- put HCMI(4)&"," after om
- put HCMI(5) after om
- end if
- set cursor to "busy"
- repeat with a = 1 to the number of items in om
- if there is a menu (item a of om) then delete menu (item a of om)
- end repeat
- if gTToolsInstalled ¡ "true" then
- --menu 3 is the edit menu. we'll assume it is present
- repeat
- if there is a menuitem 7 of menu 3 then
- delete menuitem 7 of menu 3
- else
- exit repeat
- end if
- end repeat
- else
- if there is a menuitem HCMI(6) of menu 3 then delete menuitem HCMI(6) of menu 3
- if there is a menuitem HCMI(7) of menu 3 then delete menuitem HCMI(7) of menu 3
- if there is a menuitem HCMI(8) of menu 3 then delete menuitem HCMI(8) of menu 3
- end if
- set cursor to "busy"
- create menu bn
- if newbookmenu="true" or hadBooks = "" then
- put BMItems() into menu bn with menuMsg BMMsgs()
- put "" into firstopen
-
- --Tool Palette,menubar,large print,annotations,paper clips,progress gauge,Notebook,find╔,help
- set commandchar of menuitem tStr("LibMsg",41) of menu bn to "T"
- set commandchar of menuitem tStr("LibMsg",42) of menu bn to " "
- set commandchar of menuitem tStr("LibMsg",45) of menu bn to "L"
- set commandchar of menuitem tStr("LibMsg",46) of menu bn to "A"
- set commandchar of menuitem tStr("LibMsg",44) of menu bn to "K"
- set commandchar of menuitem tStr("LibMsg",43) of menu bn to "G"
- set commandchar of menuitem tStr("LibMsg",47) of menu bn to "N"
- set commandchar of menuitem tStr("LibMsg",49) of menu bn to "F"
- set commandchar of menuitem tStr("LibMsg",48) of menu bn to "?"
-
- if hadBooksCheck¡"" then
- repeat with a = 1 to 6
- set the checkmark of menuitem a of menu bn to (line a of hadBooksCheck)
- end repeat
- end if
- set menuMsg of menuitem tStr("LibMsg",47) of menu bn to doNewNoteBook
- set cursor to "busy"
- if gTTKPresent = "true" then
- put tStr("LibMsg",21) into mn --NAME OF TOOLKIT MENU item in books menu
- put "-,"&mn after menu bn
- set the menuMsg of menuitem mn of menu bn to eTTools
- set the commandchar of menuitem mn of menu bn to "E"
- if gTToolsInstalled = "true" then
- if not StackInUse(gTTKName) then
- start using stack getstackpath()&gTTKName
- end if
- set the checkmark of menuitem mn of menu bn to true
- create menu tStr("EBTMsg",126)
- MakeToolMenu
- show menubar
- put "true" into mS
- set the checkmark of menuitem tStr("LibMsg",42) of menu bn to true
- put "true" into mST
- end if
- else
- put "false" into gTToolsInstalled
- end if
- else
- if hadBooks ¡ "" then
- put line 1 to 6 of tStr("LibMsg",63) into line 1 to 6 of hadBooks
- put hadBooks into menu bn
- repeat with x = 1 to the number of lines in hadBooks
- set cursor to "busy"
- set the menumsg of menuitem x of menu bn to line x of hadBooksMsg
- set the checkmark of menuitem x of menu bn to line x of hadBooksCheck
- set the enabled of menuitem x of menu bn to line x of hadBooksState
- set the commandchar of menuitem x of menu bn to line x of hadBooksChar
- end repeat
- end if
- end if
- set cursor to "busy"
- doCSTR "MenuSnapShotCSTR"
- US